package cn.mandifal.portal.controller;

import cn.mandifal.manager.service.GoodsCategoryService;
import cn.mandifal.pojo.DpItemCat;
import cn.mandifal.pojo.ItemCatResult;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 首页商品分类列表显示
 * @author shun
 */
@RestController
@RequestMapping("/goodsCategoryController")
public class GoodsCategoryController {
    @Reference(timeout = 3000)
    private GoodsCategoryService goodsCategoryService;
    /**
     * 根据上级 id 查询
     * @return 返回结果
     */
    @RequestMapping("/findByParentId")
    public List<ItemCatResult> findByParentId(){
        return goodsCategoryService.findShowResult();
    }


}